package net.yihang.miaosha.dao;

import net.yihang.miaosha.domain.MiaoshaUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MiaoshaUserDao {

    @Select("select * from miaosha_user where id=#{id}")
    public MiaoshaUser findById(long id);

    @Insert("insert into miaosha_user values(#{id}, #{password}, #{salt})")
    public void insert(MiaoshaUser user);

    public void insertBatch(List<MiaoshaUser> list);

}
